package Text;

import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);//构建输入对象
        System.out.print("请输入第1个整数:");
        int a = input.nextInt();
        System.out.print("请输入第2个整数:");
        int b = input.nextInt();
        System.out.print("请输入第3个整数:");
        int c = input.nextInt();

        int temp = 0;//定义临时变量
        //进行排序

        if (a<b){
            temp=b;
            b=a;
            a=temp;
        }
        if (a<c){
            temp=c;
            c=a;
            a=temp;
        }
        if (b<c){
            temp=c;
            c=b;
            b=temp;
        }
        System.out.println(a+" "+b+" "+c);
    }
}
